package com.chris.core.socket.bio.service;


import com.chris.core.socket.bio.util.BioSokcetServerUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import java.io.*;

/**
 * 多线程，同步阻塞式，sokect 服务端
 * 苏斌 2022-3-20
 */
@Service
public class SokcetBioServerService  {
    Logger log = LoggerFactory.getLogger(this.getClass());

    public BioSokcetServerUtil sokcet = new BioSokcetServerUtil(10101,55000,180000,"\r\n") {
        @Override
        public void OnRevice(String sid, String mag) {
            log.debug("服务端->读取->客户端："+sid+"-->内容:" + mag);
        }
    };

    public SokcetBioServerService() {
        sokcet.Open();
    }
}
